package com.lyn.module_custom_view.selector;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;

import java.util.ArrayList;
import java.util.List;

/**
 * @author:longyongning
 * @date:2021/10/24
 * @description:
 */
public class SelectorView extends View {
    private Paint paint;
    private ArrayList<String> data;

    public void setData(ArrayList<String> data) {
        this.data = data;
        postInvalidate();
    }

    public SelectorView(Context context) {
        super(context);
        init();
    }

    public SelectorView(Context context, AttributeSet attrs) {
        super(context, attrs);
        init();
    }


    private void init(){
        paint=new Paint();
        paint.setAntiAlias(true);
        paint.setColor(Color.YELLOW);
        paint.setStrokeWidth(3);
    }


    @Override
    protected void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        if (data==null)return;
        for (int i = 0; i < data.size(); i++) {

        }
    }
}
